package com.example.demo.moduel.controller;

import com.example.demo.moduel.entity.Teacher;
import com.example.demo.moduel.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("api/teacher")
public class TeacherController {

       @Autowired
       private TeacherService teacherService;
       @RequestMapping("/getTeacher")
       @ResponseBody
       public Teacher getTeacher(){
              return teacherService.getTeacher();
       }
}
